//传来的值
export interface DataLocal {
  site: {
    ajaxurl: string; //ajaxurl链接
    home: string; //首页
    theme: string; //主题网址
  };
  type: {
    device: string;
    page_type: string;
  }; //当前页面类型
  menu: Menu[]; //菜单

  config: Config; //设置
  home: {
    pc: Home; //首页 PC 内容
    mobile: SingleMeat[]; //首页移动端内容
  };
  single: Single; //当前页面内容

  search: {
    meat: SearchMeat; //搜索信息
    content: SingleMeat[]; //搜索结果
  };

  meat: Meat; //文章附加信息
  category: Category; //分类信息
  tag: Category; //分类信息
  widgets: string;//小工具信息
}

//菜单
export interface Menu {
  id: string; //菜单ID
  menu: string; //菜单标题
  active?: boolean; //菜单状态
  list: MenuList[]; //子菜单
}
//子菜单
export interface MenuList {
  id: string; //子菜单ID
  title: string; //子菜单标题
  url: string; //子菜单链接
  tag?: string; //标识符
}
//配置
export interface Config {
  header: {
    logo: string;
  };
  footer: {
    meat: string;
  };
}
//首页
export interface Home {
  switch: string; //首页开关
  slid: HomeArray[]; //幻灯片
  recommend: HomeArray[]; //推荐
  hot: SingleMeat[]; //置顶推荐
  selected: SingleMeat[]; //精选
  end: SingleMeat[]; //末尾推荐
}
//首页图片类型数据
export interface HomeArray {
  id: number;
  featured_image: string;
  link: string;
  type: string;
}
//常用文章类型
export interface SingleMeat {
  id: number;
  link: string;
  title: string;
  description: string;
  featured_image: string | boolean;
}

//文章内容
export interface Content {
  ID: number; //内容唯一ID
  url: string; //唯一链接
  post_author: string; //作者
  post_content: string; //内容
  post_date: string; //时间
  post_excerpt: string; //描述
  post_password: string; //密码
  post_status: string;
  post_title: string; //标题
  post_type: string; //类型
  tag?: string; //标记
}
//文章元信息
export interface Meat {
  site: string;
  switch: string;
}

//文章信息
export interface Single {
  content: Content;
  meat: Meat;
}

//搜索信息
export interface SearchMeat {
  current_page: number; //当前页码
  total_pages: number; //总页数
  total_results: number; //搜索结果数量
  query: string; //搜索的问题
}

export interface Category {
  meat: {
    id: number;
    link: string;
    name: string;
    description: string;
  };
  content: SingleMeat[];
}
